Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Making Thumbnail Pictures


MakeThumbnailFromPixMap

The MakeThumbnailFromPixMap function creates an 80-by-80 pixel thumbnail picture from a specified pixel map structure.

pascal OSErr MakeThumbnailFromPixMap (PixMapHandle src, 
                              const Rect *srcRect,
                              short colorDepth, 
                              PicHandle thumbnail,
                              ProgressProcRecordPtr progressProc);
src
Contains a handle to the image from which the thumbnail is to be extracted. The image must be stored in a pixel map structure.
srcRect
Contains a pointer to a rectangle defining the portion of the image to use for the thumbnail.
colorDepth

Specifies the depth at which the image is likely to be viewed. If you set this parameter to 0, the Image Compression Manager determines the appropriate value for the source image. Values of 1, 2, 4, 8, 16, 24, and 32 indicate the number of bits per pixel for color images. Values of 34, 36, and 40 indicate 2-bit, 4-bit, and 8-bit grayscale, respectively, for grayscale images.
thumbnail
Contains a handle to the destination picture structure for the thumbnail image. The compressor resizes this handle for the resulting data.
progressProc
Points to a progress function structure. During the operation, the Image Compression Manager will occasionally call a function you provide in order to report its progress (see "Progress Functions" beginning on page 3-146, for more information about progress functions). This parameter contains a pointer to a structure that identifies that progress function. If you have not provided a progress function, set this parameter to nil. If you pass a value of -1, you obtain a standard progress function.
DESCRIPTION
The thumbnail returned is an 80-by-80 pixel picture, but the aspect ratio is maintained.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
memFullErr-108Not enough memory available
codecAbortErr-8967Operation aborted by the progress function

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996